﻿package src{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	public class MainMenu extends MovieClip {
		public static const NEW_GAME:String = "New Game";
		public static const ABOUT:String = "About";
		
		public function MainMenu(){
			newGameBtn.addEventListener(MouseEvent.CLICK, newGame);
			aboutBtn.addEventListener(MouseEvent.CLICK, about);
		}
		
		private function newGame(event:MouseEvent):void {
			dispatchEvent(new Event(NEW_GAME));
		}
		
		private function about(event:MouseEvent) {
			dispatchEvent(new Event(ABOUT));
		}
		
		public function removeListeners() {
			newGameBtn.removeEventListener(MouseEvent.CLICK, newGame);
			aboutBtn.removeEventListener(MouseEvent.CLICK, about);
		}
	}
}
